package com.ybkj.daijia.server.errand;

import java.io.Serializable;
import java.util.Date;

/**
 * 临时充值记录对象
 *
 * @author Administrator
 */
public class PayRecordOrder implements Serializable {

    private static final long serialVersionUID = 1L;
    private Long id;
    private Date created;
    private Date updated;
    private Long orderId;
    private Double money;
    private PayRecordTypeOrder payRecordTypeOrder;
    private Boolean treatment;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }


    public PayRecordTypeOrder getPayRecordTypeOrder() {
        return payRecordTypeOrder;
    }

    public void setPayRecordTypeOrder(PayRecordTypeOrder payRecordTypeOrder) {
        this.payRecordTypeOrder = payRecordTypeOrder;
    }

    public Boolean isTreatment() {
        return treatment;
    }

    public void setTreatment(Boolean treatment) {
        this.treatment = treatment;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PayRecordOrder other = (PayRecordOrder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCreated() == null ? other.getCreated() == null
            : this.getCreated().equals(other.getCreated()))
            && (this.getUpdated() == null ? other.getUpdated() == null
            : this.getUpdated().equals(other.getUpdated()))
            && (this.getOrderId() == null ? other.getOrderId() == null
            : this.getOrderId().equals(other.getOrderId()))
            && (this.getMoney() == null ? other.getMoney() == null
            : this.getMoney().equals(other.getMoney()))
            && (this.getPayRecordTypeOrder() == null ? other.getPayRecordTypeOrder() == null
            : this.getPayRecordTypeOrder().equals(other.getPayRecordTypeOrder()))
            && (this.isTreatment() == null ? other.isTreatment() == null
            : this.isTreatment().equals(other.isTreatment()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
        result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getMoney() == null) ? 0 : getMoney().hashCode());
        result = prime * result + ((getPayRecordTypeOrder() == null) ? 0
            : getPayRecordTypeOrder().hashCode());
        result = prime * result + ((isTreatment() == null) ? 0 : isTreatment().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", created=").append(created);
        sb.append(", updated=").append(updated);
        sb.append(", orderId=").append(orderId);
        sb.append(", money=").append(money);
        sb.append(", payRecordTypeOrder=").append(payRecordTypeOrder);
        sb.append(", treatment=").append(treatment);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    public enum PayRecordTypeOrder {
        /**
         * 支付宝
         */
        alipay,
        /**
         * 微信
         */
        weixin,
        /**
         * 银联支付
         */
        unionpay
    }
}